<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>C++ Web Framework: /home/herik/CPPWebFramework/CPPWebFramework/cwf/cppwebapplication.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">C++ Web Framework
   &#160;<span id="projectnumber">3.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b2448bd9c6b97c57da490a507d179d6c.html">CPPWebFramework</a></li><li class="navelem"><a class="el" href="dir_3bacee99d34edff13677baafd8c3a47f.html">cwf</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">cppwebapplication.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> Copyright 2017 Herik Lima de Castro and Marcelo Medeiros Eler</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> Distributed under MIT license, or public domain if desired and</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> recognized in your jurisdiction.</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> See file LICENSE for detail.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#ifndef CPPWEBAPPLICATION_H</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#define CPPWEBAPPLICATION_H</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;QString&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;QCoreApplication&gt;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;QMessageLogContext&gt;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;cppwebserver.h&quot;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;cppwebframework_global.h&quot;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;CWF_BEGIN_NAMESPACE</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class_cpp_web_application.html">   44</a></span>&#160;<span class="keyword">class </span>CPPWEBFRAMEWORKSHARED_EXPORT <a class="code" href="class_cpp_web_application.html">CppWebApplication</a></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;{</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    QCoreApplication application;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <a class="code" href="class_configuration.html">Configuration</a>    configuration;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <a class="code" href="class_cpp_web_server.html">CppWebServer</a>     *server;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordtype">bool</span> valid = <span class="keyword">false</span>;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <a class="code" href="class_cpp_web_application.html">CppWebApplication</a>(<span class="keyword">const</span> <a class="code" href="class_cpp_web_application.html">CppWebApplication</a> &amp;other) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <a class="code" href="class_cpp_web_application.html">CppWebApplication</a> &amp;operator=(<span class="keyword">const</span> <a class="code" href="class_cpp_web_application.html">CppWebApplication</a> &amp;other) = <span class="keyword">delete</span>;        </div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="class_cpp_web_application.html">CppWebApplication</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[], <span class="keyword">const</span> QString &amp;serverPath, <a class="code" href="class_filter.html">Filter</a> *filter = <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    ~<a class="code" href="class_cpp_web_application.html">CppWebApplication</a>();</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> CONTROLLER&gt;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="class_cpp_web_application.html#ab4f105dee5ddd0cb7c6c93917057e850">   85</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_cpp_web_application.html#ab4f105dee5ddd0cb7c6c93917057e850">addController</a>(<span class="keyword">const</span> QString &amp;url) noexcept</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    {</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        server-&gt;<a class="code" href="class_cpp_web_server.html#a3982d41728fd3237c42dd6dabbf1efb6">addController</a>&lt;CONTROLLER&gt;(url);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    }</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordtype">int</span> start();</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;};</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;CWF_END_NAMESPACE</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="preprocessor">#endif // CPPWEBAPPLICATION_H</span></div><div class="ttc" id="class_cpp_web_application_html"><div class="ttname"><a href="class_cpp_web_application.html">CppWebApplication</a></div><div class="ttdoc">This class is responsible for encapsulating the QCoreApplication, the CppWebServer and configure the ...</div><div class="ttdef"><b>Definition:</b> cppwebapplication.h:44</div></div>
<div class="ttc" id="class_cpp_web_server_html_a3982d41728fd3237c42dd6dabbf1efb6"><div class="ttname"><a href="class_cpp_web_server.html#a3982d41728fd3237c42dd6dabbf1efb6">CppWebServer::addController</a></div><div class="ttdeci">void addController(const QString &amp;url) noexcept</div><div class="ttdoc">Hitches a url to a Controller. </div><div class="ttdef"><b>Definition:</b> cppwebserver.h:62</div></div>
<div class="ttc" id="class_cpp_web_server_html"><div class="ttname"><a href="class_cpp_web_server.html">CppWebServer</a></div><div class="ttdoc">The CppWebServer class is a HTTP server, responsable to receive and dispatch the requisitions. </div><div class="ttdef"><b>Definition:</b> cppwebserver.h:33</div></div>
<div class="ttc" id="class_filter_html"><div class="ttname"><a href="class_filter.html">Filter</a></div><div class="ttdoc">The Filter class works like a filter. You can use this class to validate sessions or measuring runtim...</div><div class="ttdef"><b>Definition:</b> filter.h:23</div></div>
<div class="ttc" id="class_configuration_html"><div class="ttname"><a href="class_configuration.html">Configuration</a></div><div class="ttdoc">All classes of C++ Web Framework are contained within the namespace CWF. </div><div class="ttdef"><b>Definition:</b> configuration.h:24</div></div>
<div class="ttc" id="class_cpp_web_application_html_ab4f105dee5ddd0cb7c6c93917057e850"><div class="ttname"><a href="class_cpp_web_application.html#ab4f105dee5ddd0cb7c6c93917057e850">CppWebApplication::addController</a></div><div class="ttdeci">void addController(const QString &amp;url) noexcept</div><div class="ttdoc">Hitches a url to a Controller. </div><div class="ttdef"><b>Definition:</b> cppwebapplication.h:85</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon May 28 2018 11:09:08 for C++ Web Framework by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
